package com.huakang.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * inpatient
 * @author 
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Inpatient implements Serializable {
    private Integer inpid;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date indate;

    private Integer srid;

    private Integer kid;

    private Integer pid;

    private Integer did;

    private Integer bid;

    private static final long serialVersionUID = 1L;

    public Integer getInpid() {
        return inpid;
    }

    public void setInpid(Integer inpid) {
        this.inpid = inpid;
    }

    public Date getIndate() {
        return indate;
    }

    public void setIndate(Date indate) {
        this.indate = indate;
    }

    public Integer getSrid() {
        return srid;
    }

    public void setSrid(Integer srid) {
        this.srid = srid;
    }

    public Integer getKid() {
        return kid;
    }

    public void setKid(Integer kid) {
        this.kid = kid;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public Integer getDid() {
        return did;
    }

    public void setDid(Integer did) {
        this.did = did;
    }

    public Integer getBid() {
        return bid;
    }

    public void setBid(Integer bid) {
        this.bid = bid;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Inpatient other = (Inpatient) that;
        return (this.getInpid() == null ? other.getInpid() == null : this.getInpid().equals(other.getInpid()))
            && (this.getIndate() == null ? other.getIndate() == null : this.getIndate().equals(other.getIndate()))
            && (this.getSrid() == null ? other.getSrid() == null : this.getSrid().equals(other.getSrid()))
            && (this.getKid() == null ? other.getKid() == null : this.getKid().equals(other.getKid()))
            && (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid()))
            && (this.getDid() == null ? other.getDid() == null : this.getDid().equals(other.getDid()))
            && (this.getBid() == null ? other.getBid() == null : this.getBid().equals(other.getBid()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getInpid() == null) ? 0 : getInpid().hashCode());
        result = prime * result + ((getIndate() == null) ? 0 : getIndate().hashCode());
        result = prime * result + ((getSrid() == null) ? 0 : getSrid().hashCode());
        result = prime * result + ((getKid() == null) ? 0 : getKid().hashCode());
        result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
        result = prime * result + ((getDid() == null) ? 0 : getDid().hashCode());
        result = prime * result + ((getBid() == null) ? 0 : getBid().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", inpid=").append(inpid);
        sb.append(", indate=").append(indate);
        sb.append(", srid=").append(srid);
        sb.append(", kid=").append(kid);
        sb.append(", pid=").append(pid);
        sb.append(", did=").append(did);
        sb.append(", bid=").append(bid);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}